package com.wanxi.feign;

import com.wanxi.model.PatientApplyQuery;
import com.wanxi.model.PatientQuery;
import com.wanxi.entity.Patient;
import com.wanxi.entity.PatientApply;
import com.wanxi.result.CommonResult;
import com.wanxi.vo.PatientApplyDTO;
import com.wanxi.vo.PatientDTO;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "patient-server",path = "/patient")
public interface PatientClient {
    @ApiOperation(value = "查询患者接口")
    @ApiResponses({
            @ApiResponse(code = 200,message = "OK",response = PatientDTO.class,responseContainer = "List")
    })
    @GetMapping("/findPatient")
    public CommonResult findPatient(@SpringQueryMap PatientQuery patientQuery);
    @ApiOperation(value = "后台查询患者接口")
    @ApiResponses({
            @ApiResponse(code = 200,message = "OK",response = Patient.class,responseContainer = "List")
    })
    @GetMapping("/findPatientBack")
    public CommonResult findPatientBack(@SpringQueryMap PatientQuery patientQuery);
    @ApiOperation(value = "添加患者接口",response = CommonResult.class)
    @PostMapping("/addPatient")
    public CommonResult addPatient(PatientDTO patientDTO);

    @ApiOperation(value = "修改患者接口",response = CommonResult.class)
    @PutMapping("/updatePatient")
    public CommonResult updatePatient(@RequestParam("patientId") Long patientId,@RequestBody PatientDTO patientDTO);

    @ApiOperation(value = "患者停启用",response = CommonResult.class)
    @ApiImplicitParam(name = "id",value = "患者id",required = true)
    @PutMapping("/updatePatientState")
    public CommonResult updatePatientState(@RequestParam("id") Long id,@RequestParam("state") Integer state);


    @ApiOperation(value = "查询患者审核申请")
    @ApiResponses({
            @ApiResponse(code = 200,message = "OK",responseContainer = "List",response = PatientApplyDTO.class)
    })
    @GetMapping("/getPatientApply")
    public CommonResult getPatientApply(@SpringQueryMap PatientApplyQuery patientApplyQuery);

    @ApiOperation(value = "后台查询患者审核申请")
    @ApiResponses({
            @ApiResponse(code = 200,message = "OK",responseContainer = "List",response = PatientApply.class)
    })
    @GetMapping("/getPatientApplyBack")
    public CommonResult getPatientApplyBack(@SpringQueryMap PatientApplyQuery patientApplyQuery);

    @ApiOperation(value = "添加患者审核申请",response = CommonResult.class)
    @PostMapping("/addPatientApply")
    public CommonResult addPatientApply(@RequestBody PatientApplyDTO patientApplyDTO);

    @ApiOperation(value = "修改患者申请表",response = CommonResult.class)
    @PutMapping("/updatePatientApply")
    public CommonResult updatePatientApply(@RequestParam("patientApplyId") Long patientApplyId,@RequestBody PatientApplyDTO patientApplyDTO);

    @ApiOperation(value = "患者申请表停启用",response = CommonResult.class)
    @PutMapping("/updatePatientApplyState")
    public CommonResult updatePatientApplyState(@RequestParam("patientApplyId") Long patientApplyId,@RequestParam("state")Integer state);
}
